﻿namespace Grow.Binary
{
    /// <summary>
    /// 二进制 序列化 上下文
    /// </summary>
    public interface IBinaryContext
    {
        Task<T?> DeserializeAsync<T>(byte[] byteArr, CancellationToken cancellationToken = default);
        Task<byte[]> SerializeAsync<T>(T value, CancellationToken cancellationToken = default);
    }
}
